import { Navigate } from 'react-router-dom';
// 路由守卫 
const Isrouters = ({ aa: Emelent }: { aa: React.ComponentType }) => {
  const token = localStorage.getItem('token');
  if (token) {
    return <Emelent />;
  } else {
    return <Navigate to="/login" />;
  }
};
export default Isrouters;